using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using DBA.DataBaseAccess;

namespace BL.ServerBL
{
    partial class ServerRemotingCommon : BL.BCClientRemotingInterface.IBudgetCheck
    {
        public DataSet GetBudgetInfoByState(string budget_state_id)
        {
            return DBAccess.GetBudgetInfoByStateId(budget_state_id);
        }
        
        public DataSet GetBudgetInfoByStateDepartment(string budget_state_id, string department_id)
        {
            return DBAccess.GetBudgetInfoByStateDepartment(budget_state_id, department_id);
        }

        public DataSet GetBudgetType()
        {
            return DBAccess.GetBudgetTypeNoParent();

        }
        public DataSet GetBudgetSubType(string budget_type_parentid)
        {
            return DBAccess.GetBudgetTypeByParentId(budget_type_parentid);
        }

        public DataSet GetPayMethod()
        {
            return DBAccess.GetPayMethod();
        }

        public DataSet GetPurchaseMethod()
        {
            return DBAccess.GetPurchaseMethod();
        }
        public DataSet GetBudgetRange()
        {
            return DBAccess.GetBudgetRange();
        }

        public DataSet GetAllDeptPName()
        {
            return DBAccess.GetAllDeptPName();
        }
        public DataSet GetDeptNameByPId(string department_pid)
        {
            return DBAccess.GetDeptNameByPId(department_pid);
}
        public DataSet GetAllBudgetState()
        {
            return DBAccess.GetAllBudgetState();
        }


        public DataSet GetBudgetInfo(string budget_range_id, string budget_type_id, string department_id,
            string pay_method_id, string purchase_method_id, string budget_state_id,
            bool allapproved, bool isfullinfo)
        {
            return DBAccess.GetBudgetInfo(budget_range_id, budget_type_id, department_id, pay_method_id,
                purchase_method_id, budget_state_id, allapproved, isfullinfo);
        } 
        public DataSet GetBudgetInfo(string budget_range_id, string budget_type_id, string department_id,
            string pay_method_id, string purchase_method_id, string budget_state_id,
            bool isfullinfo)
        {
            return DBAccess.GetBudgetInfo(budget_range_id, budget_type_id, department_id, pay_method_id,
                purchase_method_id, budget_state_id, isfullinfo);
        }

        public DataSet GetBudgetItemInfo(string budget_id)
        {
            return DBAccess.GetBudgetItemInfo(budget_id);
        }

        public DataSet GetDeptBudgetType(string department_id)
        {
            return DBAccess.GetDeptBudgetType(department_id);
        }

        public int GetBudgetBalance(string budget_range_id, string deparment_id, string budget_type_id)
        {
            return Convert.ToInt32(DBAccess.GetBudgetBalanceSum(budget_range_id, deparment_id, budget_type_id));
        }
    }
}
